#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
using namespace std;

int main() {
    string sr1;
    cin >> sr1;

    int* pa = new int[24]{ 0 };
    string::iterator it = sr1.begin();
    while (it != sr1.end())
    {
        pa[(*it) - 'a']++;
        it++;
    }

    for (size_t i = 0; i < 24; i++)
    {
        if (pa[i] == 1)
        {
            char ch = i + 'a';
            cout << ch;
            delete[] pa;
            return 0;
        }
    }
    cout << -1;
    delete[] pa;

    return 0;



}